<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/11/10
 * Time: 14:19
 */

namespace common\business\task;


use common\models\Task;

interface TaskHandlerInterface
{
    /**
     * @param Task|null|array $task
     * @return TaskResponseData
     */
    public function process($task);

    /**
     * @param Task|null|array $task
     * @param $data
     * @return boolean
     */
    public function isNeedRedo($task, $data);

    /**
     * @param Task|null|array $task
     * @return boolean
     */
    public function isNeedSuspend($task);

    /**
     * @param Task|null|array $task
     * @return boolean
     */
    public function isNeedNotifyException($task);
}